<?php
if(!file_exists("count.dat"))
{$fp = fopen ("count.dat","w");
$count=0;
fwrite($fp,$count);
fclose($fp);
}
$fp=fopen("./count.dat","r");
$count = fread ($fp,20);
fclose($fp);
if(!isset($_SESSION['count']))
{	$count++;
       $_SESSION['count']=$count; 
	   $fp = fopen ("count.dat","w+");
fwrite ($fp,$count);
fclose ($fp);
}
?>